import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import axios from "axios";
import Vueaxios from "vue-axios";
// axios配置之前把基础路径配置
axios.defaults.baseURL = "http://juanxincai.zyxj888.top/";
Vue.use(Vueaxios, axios);
Vue.config.productionTip = false;

// 集swiper
// npm install swiper@5.* vue-awesome-swiper@4.*
import VueAwesomeSwiper from "vue-awesome-swiper";
import "swiper/css/swiper.css";
Vue.use(VueAwesomeSwiper);

// 封装axios请求
import api from "./api/index.js";
Vue.prototype.$api = api;

import VueLazyload from "vue-lazyload";
Vue.use(VueLazyload);
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: "/src/assets/erji.png",
  loading: "/src/assets/1654871744407.png",
  attempt: 1,
});

Vue.config.productionTip = false;

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
